package models

import "gorm.io/gorm"

type Book struct {
	gorm.Model
	Name    string `gorm:"type:varchar(32);not null"json:"name"`
	Content string `gorm:"type:varchar(30);not null"json:"content"`
	Img     string `gorm:"type:varchar(200)"json:"img"`
}

func (b *Book) Add() error {
	return DB.Create(&b).Error
}
